﻿namespace DataManage
{
    public static class EnumVerification
    {
        public static bool IsUSBCAN1(this ZLGCANType zLGCANType)
        {
            return zLGCANType == ZLGCANType.USBCAN1;
        }

        public static bool IsUSBCAN2(this ZLGCANType zLGCANType)
        {
            return zLGCANType == ZLGCANType.USBCAN2;
        }

        public static bool IsUSBCANFD200U(this ZLGCANType zLGCANType)
        {
            return zLGCANType == ZLGCANType.USBCANFD_200U;
        }
        public static bool IsUSBCANFDPCIE400U(this ZLGCANType zLGCANType)
        {
            return zLGCANType == ZLGCANType.PCIECANFD_400U;
        }
        public static bool IsUSBCANPCIE200UEX(this ZLGCANType zLGCANType)
        {
            return zLGCANType == ZLGCANType.PCIECANFD_200U_EX;
        }

        public static bool IsUSBCANFD_PCIE(this ZLGCANType zLGCANType)
        {
            return zLGCANType == ZLGCANType.PCIECANFD_100U || zLGCANType == ZLGCANType.PCIECANFD_200U ||
                   zLGCANType == ZLGCANType.PCIECANFD_200U_EX || zLGCANType == ZLGCANType.PCIECANFD_400U;
        }

        public static bool IsUSBCANFD(this ZLGCANType zLGCANType)
        {
            return zLGCANType == ZLGCANType.USBCANFD_200U || zLGCANType == ZLGCANType.USBCANFD_100U || zLGCANType == ZLGCANType.USBCANFD_MINI;
        }
    }
}
